<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/3
 * Time: 15:45
 */

namespace App\Http\Controllers\Admin;


use Illuminate\Http\Request;

class ArticleController extends BaseController
{
    public function article(Request $request)
    {
        if ($request->ajax()) {
            $input = $request->all();
            $list  = service('Article')->getList($input);
            if ($list['code'] > 0) {
                return $this->error($list['code'], $list['msg']);
            }
            return view('admin.article.articleAjax', ['list' => $list['data']['list']]);
        } else {
            return view('admin.article.article');
        }
    }

    public function articleAdd(Request $request)
    {
        return view('admin.article.articleAdd',[
            'title'=>'文章添加'
        ]);
    }

}
